<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Trending extends CI_Controller {

	public function index() {

	}

	public function perLocalityGender() {
		$region = $this->input->post('region');

		$data = array(
				array(
					'name' => 'Malabon',
					'data' => array(
								rand(75, 150),
								rand(75, 150)
							)
				),
				array(
					'name' => 'Caloocan',
					'data' => array(
								rand(75, 150),
								rand(75, 150)
							)
				),
				array(
					'name' => 'Valenzuela',
					'data' => array(
								rand(75, 150),
								rand(75, 150)
							)
				),
				array(
					'name' => 'Navotas',
					'data' => array(
								rand(75, 150),
								rand(75, 150)
							)
				),
				array(
					'name' => 'Manila',
					'data' => array(
								rand(75, 150),
								rand(75, 150)
							)
				),
				array(
					'name' => 'Quezon City',
					'data' => array(
								rand(75, 150),
								rand(75, 150)
							)
				),
				array(
					'name' => 'Pasig',
					'data' => array(
								rand(75, 150),
								rand(75, 150)
							)
				),
				array(
					'name' => 'Mandaluyong',
					'data' => array(
								rand(75, 150),
								rand(75, 150)
							)
				),
				array(
					'name' => 'Makati',
					'data' => array(
								rand(75, 150),
								rand(75, 150)
							)
				),
				array(
					'name' => 'Taguig',
					'data' => array(
								rand(75, 150),
								rand(75, 150)
							)
				),
				array(
					'name' => 'Marikina',
					'data' => array(
								rand(75, 150),
								rand(75, 150)
							)
				)
			);

		echo json_encode($data);
	}

	public function perLocalityGroup() {
		$data = array(
				array( 
					'name' => 'CAMANAVA',
					'y' => rand(300, 750),
					'sliced' => true,
					'selected' => true 
				),
				array( 'OTHERS', rand(1000, 3500))
			);

		echo json_encode($data);
	}

	public function perLocalityGroupGender() {
		$data = array(
				array(
					'name' => 'Brothers',
					'data' => array(
							rand(150, 450),
							rand(500, 2000)
						) 
				),
				array(
					'name' => 'Sisters',
					'data' => array(
							rand(150, 450),
							rand(500, 2000)
						) 
				)
			);

		echo json_encode($data);
	}

	public function perRegion() {
		$data = array(
				array( 'Region I' , rand(0, 150)),
				array( 'Region II' , rand(0, 150)),
				array( 'Region III' , rand(0, 150)),
				array( 'Region IV - A' , rand(0, 150)),
				array( 'Region IV - B' , rand(0, 150)),
				array( 'Region V' , rand(0, 150)),
				array( 'Region VI' , rand(0, 150)),
				array( 'Region VII' , rand(0, 150)),
				array( 'Region VIII' , rand(0, 150)),
				array( 'Region IX' , rand(0, 150)),
				array( 'Region X' , rand(0, 150)),
				array( 'Region XI' , rand(0, 150)),
				array( 'Region XII' , rand(0, 150)),
				array( 'Region XIII' , rand(0, 150)),
				array( 
					'name' => 'NCR',
					'y' => rand(0, 150),
					'sliced' => true,
					'selected' => true
				),
				array( 'CAR' , rand(0, 150)),
				array( 'ARMM' , rand(0, 150))
			);

		echo json_encode($data);
	}

	public function perRegionGender() {
		$gender = $this->input->post('gender');
		
		$data = array(
				'name' => $gender,
				'data' => array(
							rand(0, 150),
							rand(0, 150),
							rand(0, 150),
							rand(0, 150),
							rand(0, 150),
							rand(0, 150),
							rand(0, 150),
							rand(0, 150),
							rand(0, 150),
							rand(0, 150),
							rand(0, 150),
							rand(0, 150),
							rand(0, 150),
							rand(0, 150),
							rand(0, 150),
							rand(0, 150)
							)
			);

		echo json_encode($data);
	}

	public function perRegionGroup() {
		$data = array(
				array( 
					'name' => 'Luzon',
					'y' => rand(1000, 1500),
					'sliced' => true,
					'selected' => true
				),
				array( 'Visayas', rand(1000, 1500)),
				array( 'Mindanao', rand(1000, 1500))
			);

		echo json_encode($data);
	}

	public function perRegionGroupGender() {
		$data = array(
					array(
						'name' => 'Brothers',
						'data' => array(
								rand(1000, 1500),
								rand(1000, 1500),
								rand(1000, 1500)
							)
					),
					array(
						'name' => 'Sisters',
						'data' => array(
								rand(1000, 1500),
								rand(1000, 1500),
								rand(1000, 1500)
							)
					)
			);

		echo json_encode($data);
	}

}
